Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update getDistance.ts #199

Closed
wants to merge 1 commit into from

Conversation

projectpublius
Copy link

Potential fix for #129 when attempting to call getDistance() on two points that are the same or very close to the same point.

add check to ensure input to acos is always <= 1
@manuelbieh
Copy link
Owner

Wow, thanks a lot! Will have a deeper look at it on sunday. There's a test to cover that case, have you seen it? Does it pass?
https://github.com/manuelbieh/geolib/blob/master/src/getDistance.test.js#L3

(I'm wondering why Circle CI doesn't run the checks 🤔 )

@ddave09
Copy link

ddave09 commented Jun 23, 2019

Can we please get this merged? I'm using this library in my production code and get the same NaN issue.

@manuelbieh
Copy link
Owner

Closed in favor of #201. Should not return NaN any longer!

@manuelbieh manuelbieh closed this Jun 23, 2019
@ddave09
Copy link

ddave09 commented Jun 24, 2019

Thanks @manuelbieh!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants